<html>
  <head>  
  <title>自定义参数界面及工具栏</title>  
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
  <script type="text/javascript">
    function autoSubmit() {
	  var num = document.getElementById('num').value; //获取文本控件的值
	  var row = document.getElementById('row').value; //获取下拉框控件的值
	  //拼接出最终报表访问路径，并对完整的路径进行编码转换，防止乱码问题
	  var reportURL = encodeURI("/webroot/decision/view/report?viewlet=/demo/parameter/库存查询每页显示固定行.cpt&para=" + num + "&row=" + row);
	  document.paraForm.action = reportURL; //通过form的name获取表单，并将报表访问路径赋给表单的action
	  document.paraForm.submit(); //触发表单提交事件
    }
  </script>
  </head>  
  <body>
 
	<fieldset>
    <legend>查询表单：</legend>
	<form name="paraForm" method="post" target="reportFrame">
		最小库存量：<input type="text" name="num" id="num" value="1"/>
		每页显示行数：<select name="row" id="row">  
		<option value="10" select>10  
		<option value="20">20
		<option value="30">30
		<input type="button" name="show" value="查询" onclick="autoSubmit()"/>
    </form> <!-- 自定义工具栏-->  
    <div id="toolbar">       
    <button type="button" onclick="document.getElementById('reportFrame').contentWindow.contentPane.gotoFirstPage()">首页</button>  
    <button type="button" onclick="document.getElementById('reportFrame').contentWindow.contentPane.gotoPreviousPage()">上一页</button>       
    <button type="button" onclick="document.getElementById('reportFrame').contentWindow.contentPane.gotoNextPage()">下一页</button>       
    <button type="button" onclick="document.getElementById('reportFrame').contentWindow.contentPane.gotoLastPage()">末页</button>              
    <button type="button" onclick="document.getElementById('reportFrame').contentWindow.contentPane.noClientPrint()">零客户端打印</button>          
    <button type="button" onclick="document.getElementById('reportFrame').contentWindow.contentPane.exportReportToExcel('page')">导出[Excel](分页)</button>  
    <button type="button" onclick="document.getElementById('reportFrame').contentWindow.contentPane.exportReportToWord()">导出[Word]</button>              
    </div>  
	</fieldset>
    <iframe id="reportFrame" name="reportFrame" width="100%" height="100%" ></iframe>  
  </body>  
</html>